Integrand size = 25, antiderivative size = 265 \[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=-\frac {2 a f x}{g^3}+\frac {2 b f n x}{g^3}+\frac {b d n x}{2 e g^2}-\frac {b n x^2}{4 g^2}-\frac {b d^2 n \log (d+e x)}{2 e^2 g^2}-\frac {b e f^3 n \log (d+e x)}{g^4 (e f-d g)}-\frac {2 b f (d+e x) \log \left (c (d+e x)^n\right )}{e g^3}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g^2}+\frac {f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^4 (f+g x)}+\frac {b e f^3 n \log (f+g x)}{g^4 (e f-d g)}+\frac {3 f^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^4}+\frac {3 b f^2 n \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^4} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {45, 2463, 2436, 2332, 2442, 36, 31, 2441, 2440, 2438} \[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\frac {f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^4 (f+g x)}+\frac {3 f^2 \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^4}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g^2}-\frac {2 a f x}{g^3}-\frac {2 b f (d+e x) \log \left (c (d+e x)^n\right )}{e g^3}-\frac {b d^2 n \log (d+e x)}{2 e^2 g^2}-\frac {b e f^3 n \log (d+e x)}{g^4 (e f-d g)}+\frac {b e f^3 n \log (f+g x)}{g^4 (e f-d g)}+\frac {3 b f^2 n \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^4}+\frac {b d n x}{2 e g^2}+\frac {2 b f n x}{g^3}-\frac {b n x^2}{4 g^2} \]
[In]
[Out]
Rule 31
Rule 36
Rule 45
Rule 2332
Rule 2436
Rule 2438
Rule 2440
Rule 2441
Rule 2442
Rule 2463
Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {2 f \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3}+\frac {x \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^2}-\frac {f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3 (f+g x)^2}+\frac {3 f^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3 (f+g x)}\right ) \, dx \\ & = -\frac {(2 f) \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx}{g^3}+\frac {\left (3 f^2\right ) \int \frac {a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{g^3}-\frac {f^3 \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^2} \, dx}{g^3}+\frac {\int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx}{g^2} \\ & = -\frac {2 a f x}{g^3}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g^2}+\frac {f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^4 (f+g x)}+\frac {3 f^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^4}-\frac {(2 b f) \int \log \left (c (d+e x)^n\right ) \, dx}{g^3}-\frac {\left (3 b e f^2 n\right ) \int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{g^4}-\frac {\left (b e f^3 n\right ) \int \frac {1}{(d+e x) (f+g x)} \, dx}{g^4}-\frac {(b e n) \int \frac {x^2}{d+e x} \, dx}{2 g^2} \\ & = -\frac {2 a f x}{g^3}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g^2}+\frac {f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^4 (f+g x)}+\frac {3 f^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^4}-\frac {(2 b f) \text {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e g^3}-\frac {\left (3 b f^2 n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g^4}-\frac {(b e n) \int \left (-\frac {d}{e^2}+\frac {x}{e}+\frac {d^2}{e^2 (d+e x)}\right ) \, dx}{2 g^2}-\frac {\left (b e^2 f^3 n\right ) \int \frac {1}{d+e x} \, dx}{g^4 (e f-d g)}+\frac {\left (b e f^3 n\right ) \int \frac {1}{f+g x} \, dx}{g^3 (e f-d g)} \\ & = -\frac {2 a f x}{g^3}+\frac {2 b f n x}{g^3}+\frac {b d n x}{2 e g^2}-\frac {b n x^2}{4 g^2}-\frac {b d^2 n \log (d+e x)}{2 e^2 g^2}-\frac {b e f^3 n \log (d+e x)}{g^4 (e f-d g)}-\frac {2 b f (d+e x) \log \left (c (d+e x)^n\right )}{e g^3}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g^2}+\frac {f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^4 (f+g x)}+\frac {b e f^3 n \log (f+g x)}{g^4 (e f-d g)}+\frac {3 f^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^4}+\frac {3 b f^2 n \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{g^4} \\ \end{align*}
Time = 0.18 (sec) , antiderivative size = 220, normalized size of antiderivative = 0.83 \[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\frac {-8 a f g x+8 b f g n x-\frac {b g^2 n \left (e x (-2 d+e x)+2 d^2 \log (d+e x)\right )}{e^2}-\frac {8 b f g (d+e x) \log \left (c (d+e x)^n\right )}{e}+2 g^2 x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac {4 f^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x}-\frac {4 b e f^3 n (\log (d+e x)-\log (f+g x))}{e f-d g}+12 f^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )+12 b f^2 n \operatorname {PolyLog}\left (2,\frac {g (d+e x)}{-e f+d g}\right )}{4 g^4} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.94 (sec) , antiderivative size = 550, normalized size of antiderivative = 2.08
method | result | size |
risch | \(\frac {b \ln \left (\left (e x +d \right )^{n}\right ) x^{2}}{2 g^{2}}-\frac {2 b \ln \left (\left (e x +d \right )^{n}\right ) x f}{g^{3}}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) f^{3}}{g^{4} \left (g x +f \right )}+\frac {3 b \ln \left (\left (e x +d \right )^{n}\right ) f^{2} \ln \left (g x +f \right )}{g^{4}}-\frac {3 b n \,f^{2} \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{g^{4}}-\frac {3 b n \,f^{2} \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{g^{4}}-\frac {b n \,x^{2}}{4 g^{2}}+\frac {2 b f n x}{g^{3}}+\frac {9 b n \,f^{2}}{4 g^{4}}+\frac {b d n x}{2 e \,g^{2}}+\frac {b n d f}{2 e \,g^{3}}-\frac {b e n \,f^{3} \ln \left (g x +f \right )}{g^{4} \left (d g -e f \right )}-\frac {b n \ln \left (\left (g x +f \right ) e +d g -e f \right ) d^{3}}{2 e^{2} g \left (d g -e f \right )}-\frac {3 b n \ln \left (\left (g x +f \right ) e +d g -e f \right ) d^{2} f}{2 e \,g^{2} \left (d g -e f \right )}+\frac {2 b n \ln \left (\left (g x +f \right ) e +d g -e f \right ) d \,f^{2}}{g^{3} \left (d g -e f \right )}+\frac {b e n \ln \left (\left (g x +f \right ) e +d g -e f \right ) f^{3}}{g^{4} \left (d g -e f \right )}+\left (-\frac {i b \pi \,\operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right )}{2}+\frac {i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b}{2}+\frac {i \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b}{2}-\frac {i \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} b}{2}+b \ln \left (c \right )+a \right ) \left (\frac {\frac {1}{2} g \,x^{2}-2 f x}{g^{3}}+\frac {f^{3}}{g^{4} \left (g x +f \right )}+\frac {3 f^{2} \ln \left (g x +f \right )}{g^{4}}\right )\) | \(550\) |
[In]
[Out]
\[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )} x^{3}}{{\left (g x + f\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\int \frac {x^{3} \left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )}{\left (f + g x\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )} x^{3}}{{\left (g x + f\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )} x^{3}}{{\left (g x + f\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(f+g x)^2} \, dx=\int \frac {x^3\,\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}{{\left (f+g\,x\right )}^2} \,d x \]
[In]
[Out]